package com.xiaobo.framework.service;

import com.xiaobo.framework.bean.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import static com.xiaobo.framework.bean.MqInfo.slaveOneQueue;

/**
 * @author: <a href="get_xiaobo@163.com">Josh_Xu</a>
 * @description:
 * @create: 2020-05-18 14:47
 **/
@Component
public class OrdinarySender {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(Message message){

        this.rabbitTemplate.convertAndSend(slaveOneQueue,message);
    }
}
